<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.fc.util.*" %>
<%@ page import="com.fc.model.Member" %>
<%@ page import = "com.fc.control.DateControl"%>
<%@ page import="com.fc.control.MemberControl" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>member</title>
<script>
  	$(function(){
				//添加隔行换色
				$("tbody tr:odd").addClass("oddTR");
				
				// 添加鼠标经过样式
				$("tbody tr").mouseover(function(){
					$(this).addClass("mouseOverTR");
					$(this).children("td").each(function(){
						$(this).addClass("mouseOverTD");
						});
				});
					
				
				$("tbody tr").mouseout(function(){
					$(this).removeClass(["mouseOverTR"]);
					$(this).children("td").each(function(){
							$(this).removeClass(["mouseOverTD"]);
						});
					});
			})
			
  </script>
</head>
<body>
<form>
<strong>会员列表</strong>
   <table>
   <thead>
   <tr>
   	<th width="100">编号</th>
   	<th width="150">店铺编号</th>
   	<th width="150">姓名</th>
   	<th width="200">状态</th> 
   	<th width="200">会员类型</th> 	
   	<th width="200">性别</th>
   	<th width="200">办理时间</th> 		
   	<th width="150">操作</th>
   	<th width="150">操作</th>  
   </tr>
</thead>
<tbody>
<%
	request.setCharacterEncoding("UTF-8");
	
	int pages = ParamUtil.getInt(request, "pages", 0);
	int id=ParamUtil.getInt(request,"id",0);
	int rowsPerPage = ParamUtil.getInt(request, "pageSize", 10);
	MemberControl mc = new MemberControl();
	Member member = new Member();


	List<Member> list = new ArrayList<Member>();
	list = (List) mc.getMember(pages,rowsPerPage); 
	      
	for (int i = 0; i < list.size(); i++) {
		member = list.get(i);
%>  
	
		<tr>
	    <td align="center"><%=member.getId()%></td>
		<td align="center"><%=member.getStore_id()%></td>
		<td align="center"><%=member.getName()%></td>
		<td align="center"><%=member.getState()%></td>
		<td align="center"><%=member.getKind()%></td>
		<td align="center"><%=member.getSex()%></td>
		<td align="center"><%=member.getStart_time()%></td>
		<td align="center">
		<a href="member_update.jsp?id=<%=member.getId()%>">信息修改</a>
		</td>
		<td align="center">
		<a href="member_delete_do.jsp?id=<%=member.getId()%>" onclick='return confirm("确定要删除吗？")'>删除</a>
		</td>
		</tr>
	<%
		}
	%>   	
   	</tbody>
   </table>
   
   
    <p>	    
          <input type="button" value="添加会员" onclick="window.location.href='member_add.jsp'" />
          <input type="button" value="导出会员信息" onClick="window.location.href='Export.jsp'">
	</p>
	</form>
</body>
</html>